<script setup>
import { ref } from 'vue'
const userPwd = ref({
    id: 0,
    oldPwd: '',
    nowPwd: '',
    nowRePwd: '',
})
const rules = {
    oldPwd: [
        { required: true, message: '请输入用户原密码', trigger: 'blur' },
        {
            pattern: /^\S{5,16}$/,
            message: '昵称必须是5-16位的非空字符串',
            trigger: 'blur'
        }
    ],
    nowPwd: [
        { required: true, message: '请输入用户新密码', trigger: 'blur' },
        {
            pattern: /^\S{5,16}$/,
            message: '昵称必须是5-16位的非空字符串',
            trigger: 'blur'
        }
    ],
    nowRePwd: [
        { required: true, message: '请再次用户新密码', trigger: 'blur' },
        {
            pattern: /^\S{5,16}$/,
            message: '昵称必须是5-16位的非空字符串',
            trigger: 'blur'
        }
    ],

}
</script>
<template>
    <el-card class="page-container">
        <template #header>
            <div class="header">
                <span>重置密码</span>
            </div>
        </template>
        <el-row>
            <el-col :span="12" >
                <el-form :model="userPwd" :rules="rules" label-width="100px" size="large">
                    <el-form-item prop="oldPwd" >
                        <el-input v-model="userPwd.oldPwd"  placeholder="原密码" type="password"></el-input>
                    </el-form-item>
                    <el-form-item prop="nowPwd">
                        <el-input v-model="userPwd.nowPwd" type="password" placeholder="新密码"></el-input>
                    </el-form-item>
                    <el-form-item prop="nowRePwd">
                        <el-input v-model="userPwd.nowRePwd" type="password" placeholder="请输入再次密码"></el-input>
                    </el-form-item>
                    <el-form-item>
                        <el-button type="primary">提交修改</el-button>
                    </el-form-item>
                </el-form>
            </el-col>
        </el-row>
    </el-card>
</template>

